import request from '@/utils/request'
import { getParams } from '@/utils/utils'
const URL = {
    toLogin: '/login/toLogin2',
    loginCallback:'/login/loginCallback',
    Initiate: '/fundraising/setFundraising',
    setInformHuanzhe: '/fundraising/setInformHuanzhe',
    setInformShoukuanren: '/fundraising/setInformShoukuanren',
    setInformZhenduan: '/fundraising/setInformZhenduan',
    setInformZengxin: '/fundraising/setInformZengxin',
    userFundraisingList: '/user/userFundraisingList',
    userFundraisingDonateList: "/user/userFundraisingDonateList",
    customerInfo: '/user/customerInfo',
    userFundraisingListDeatil: '/user/userFundraisingListDeatil',
    getInformShoukuanren: '/fundraising/getInformShoukuanren',
    fundraisingDonateList: '/user/fundraisingDonateList',
    // helppay: '/fundraising/helppay',
    getHomeList: '/fundraising/getHomeList',
    getInformHuanzhe:'/fundraising/getInformHuanzhe',
    getInformZhenduan:'/fundraising/getInformZhenduan',
    getInformZengxin:'/fundraising/getInformZengxin',
    withdraw:'/user/withdraw',
    withdrawRecord:'/user/withdrawRecord',
    setCertifier:'/fundraising/setCertifier',
    sendSMS:'/login/sendSMS',
    authenticationInitiator:'/fundraising/authenticationInitiator',
    userFundraisingCertifierList:'/user/userFundraisingCertifierList',
    share:'/login/share',
    setComplaint:'/fundraising/setComplaint',
    payTest:'/pay',
    transpond:'/fundraising/transpond'
}
//登录
export function toLogin(data) {
    data = getParams(data)
    return request({
        url: URL.toLogin,
        method: "POST",
        data
    })
}
//登录
export function loginCallback(data) {
    data = getParams(data)
    return request({
        url: URL.loginCallback,
        method: "POST",
        data
    })
}
//手机发送验证码
export function sendSMS(data) {
    data = getParams(data)
    return request({
        url: URL.sendSMS,
        method: "POST",
        data
    })
}
//提交发起人信息
export function authenticationInitiator(data) {
    data = getParams(data)
    return request({
        url: URL.authenticationInitiator,
        method: "POST",
        data
    })
}
//我的信息
export function customerInfo(data) {
    data = getParams(data)
    return request({
        url: URL.customerInfo,
        method: "POST",
        data
    })
}
//主页信息
export function getHomeList(data) {
    data = getParams(data)
    return request({
        url: URL.getHomeList,
        method: "POST",
        data
    })
}
//发起筹款
export function Initiate(data) {
    data = getParams(data)
    return request({
        url: URL.Initiate,
        method: "POST",
        data
    })
}
//提交患者信息
export function setInformHuanzhe(data) {
    data = getParams(data)
    return request({
        url: URL.setInformHuanzhe,
        method: "POST",
        data
    })
}
//获取患者信息
export function getInformHuanzhe(data) {
    data = getParams(data)
    return request({
        url: URL.getInformHuanzhe,
        method: "POST",
        data
    })
}
//提交收款人信息
export function getInformShoukuanren(data) {
    data = getParams(data)
    return request({
        url: URL.getInformShoukuanren,
        method: "POST",
        data
    })
}
//获取收款人信息
export function setInformShoukuanren(data) {
    data = getParams(data)
    return request({
        url: URL.setInformShoukuanren,
        method: "POST",
        data
    })
}
//提交诊断证明
export function setInformZhenduan(data) {
    data = getParams(data)
    return request({
        url: URL.setInformZhenduan,
        method: "POST",
        data
    })
}

//获取诊断证明
export function getInformZhenduan(data) {
    data = getParams(data)
    return request({
        url: URL.getInformZhenduan,
        method: "POST",
        data
    })
}
//患者财产状况
export function setInformZengxin(data) {
    data = getParams(data)
    return request({
        url: URL.setInformZengxin,
        method: "POST",
        data
    })
}
//患者财产状况
export function getInformZengxin(data) {
    data = getParams(data)
    return request({
        url: URL.getInformZengxin,
        method: "POST",
        data
    })
}
//投诉
export function setComplaint(data) {
    data = getParams(data)
    return request({
        url: URL.setComplaint,
        method: "POST",
        data
    })
}
//提交证明人
export function setCertifier(data) {
    data = getParams(data)
    return request({
        url: URL.setCertifier,
        method: "POST",
        data
    })
}
//提交证明人
export function userFundraisingCertifierList(data) {
    data = getParams(data)
    return request({
        url: URL.userFundraisingCertifierList,
        method: "POST",
        data
    })
}

//我的筹款列表
export function userFundraisingList(data) {
    data = getParams(data)
    return request({
        url: URL.userFundraisingList,
        method: "POST",
        data
    })
}
//筹款详情
export function userFundraisingListDeatil(data) {
    data = getParams(data)
    return request({
        url: URL.userFundraisingListDeatil,
        method: "POST",
        data
    })
}

//我的捐款
export function userFundraisingDonateList(data) {
    data = getParams(data)
    return request({
        url: URL.userFundraisingDonateList,
        method: "POST",
        data
    })
}
//捐款人列表
export function fundraisingDonateList(data) {
    data = getParams(data)
    return request({
        url: URL.fundraisingDonateList,
        method: "POST",
        data
    })
}
//捐款
// export function helppay(data) {
//     data = getParams(data)
//     return request({
//         url: URL.helppay,
//         method: "POST",
//         data
//     })
// }
//提现
export function withdraw(data) {
    data = getParams(data)
    return request({
        url: URL.withdraw,
        method: "POST",
        data
    })
}
//提现列表
export function withdrawRecord(data) {
    data = getParams(data)
    return request({
        url: URL.withdrawRecord,
        method: "POST",
        data
    })
}
//分享
export function share(data) {
    data = getParams(data)
    return request({
        url: URL.share,
        method: "POST",
        data
    })
}
//分享
export function payTest(data) {
    data = getParams(data)
    return request({
        url: URL.payTest,
        method: "POST",
        data
    })
}
//转发量
export function transpond(data) {
    data = getParams(data)
    return request({
        url: URL.transpond,
        method: "POST",
        data
    })
}

